using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Logic.Sequential;
using System.Collections;
//using Data.DataTranslator;
//using System.IO;
namespace WindowsApplication2.Gui
{
    public partial class SequentialResults : UserControl
    {
        private static int RawColor=0;
        private int numberOfClusters;
        private ArrayList[] clusters;
        public SequentialResults()
        {
            InitializeComponent();
        }
        public SequentialResults(Cell[] results, int numberOfClusters)
        {
            InitializeComponent();
   //         this.numberOfClusters = numberOfClusters;
  //          this.InitializeDataToShow(results);
        }

        //private void InitializeDataToShow(Cell[] results)
        //{
        //    //initialize the number of arraylists
        //    for (int i = 0; i < this.numberOfClusters; i++)
        //        this.clusters[i] = new ArrayList();

        //    //Gets the partition of the genomes
        //    foreach (Cell c in results)
        //        this.clusters[c.GroupNumber - 1].Add(c.GenomeNumber);
        //}

        //private void SequentialResults_Load(object sender, EventArgs e)
        //{
        //  ShowClusterNames();
        //   ShowAllGenomeDetails();
        //}

        //private void ShowAllGenomeDetails()
        //{
        //    for (int i = 0; i < this.numberOfClusters; i++)
        //        this.ShowGenomeDetailsOfCluster(i);
        //}

        //private void ShowClusterNames()
        //{
        //    this.clusterNamesListBox.Items.Add("All genomes");
        //    for (int i = 1; i <= this.numberOfClusters; i++)
        //        this.clusterNamesListBox.Items.Add("Cluster No." + i.ToString());
        //    this.clusterNamesListBox.SelectedIndex = 0;
        //}

        //private void ShowGenomeDetailsOfCluster(int clusterId)
        //{
        //    kDimMap map = kDimMap.Instance;
        //    ListViewItem lvi;
        //    for(int i=0; i < this.clusters[clusterId].Count; i++)
        //    {
        //        string genomeName = map.getGenomeName((int)this.clusters[clusterId][i]);
        //        string[] properties = map.getPropertiesOfGenome((int)this.clusters[clusterId][i]);
        //        if (RawColor == 0)
        //        {
        //            RawColor = 1;
        //            lvi = new ListViewItem(properties, 0, SystemColors.ControlText, Color.Cyan, null);
        //        }
        //        else
        //        {
        //            RawColor = 0;
        //            lvi = new ListViewItem(properties, 0, SystemColors.ControlText, Color.Fuchsia, null);
        //        }

        //            foreach (string prop in properties)
        //            {
        //                if (RawColor == 0)
        //                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, prop, SystemColors.ControlText, Color.Cyan, null));
        //                else
        //                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, prop, SystemColors.ControlText, Color.Fuchsia, null));
        //            }
        //        this.genomeListView.Items.Add(lvi);
        //    }
        //}
    }
}
